home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
SCLIB.ARJ
/
SCL1SAMP.EXE
/
DATE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-01-01
|
795b
|
27 lines
#include <scl1.h>
/*******************************
shows the GetDate function */
char *Day[]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
char *Month[]={"","January","February","March","April","May","June",
"July","August","September","October","November","December"};
main()
{
struct DateData *p;
p=GetDate();
/* p points to DateData structure:
p->WeekDay = day of the week (0=Sunday),
p->MonthDay = day (1-31),
p->Month = month (1-12)
p->Year = year (1980 - 2099).
The month and day numbers reported by GetDate will be used as an
index to the week and months names arrays we have previously
defined.*/
printf("\n\nToday is %s, %s %d,%d",Day[p->WeekDay],Month[p->Month],p->MonthDay,p->Year);
}